#include <iostream>
#include "simpleble/Adapter.h"
#include "simpleble/SimpleBLE.h"
#include "sqlite3.h"

int main() {
    if (!SimpleBLE::Adapter::bluetooth_enabled()) {
        std::cout << "[Error] Bluetooth is not enabled.\n";
        return 1;
    }

	auto adapter_list = SimpleBLE::Adapter::get_adapters();
	if (adapter_list.empty()) {
		std::cout << "[Error ] Adapter is not Available.\n";
		return 1;
	}
	auto adapter = adapter_list.at(0);

    sqlite3* db;
    const char database_filename[] = "test.db";
    int ret = sqlite3_open(database_filename, &db);
    if (ret != SQLITE_OK) {
        std::cout << "Fail to open database " << database_filename << ".\n";
        return 1;
    }
    sqlite3_close(db);
    return 0;
}
